<template>
  <div style="padding: 20px 20px 0px 20px">
    <span style="font-size: 35px">店铺余额</span>
    <el-table
        :data="DepositData"
        style="width: 100%;"
        :show-overflow-tooltip="false"
        :border="true"
    >
      <el-table-column prop="uname" label="用户" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="name" label="店铺" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="withdrawalProfit" label="可提现" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="frozenProfit" label="冻结" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column prop="totalProfit" label="已提现" :show-overflow-tooltip="true"></el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
              size="mini"
              @click="particulars(scope.row)">详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-dialog
        :visible.sync="xq"
        width="30%"
        style="text-align: center">
      <el-table
          :data="xqData"
          style="width: 100%;"
          :show-overflow-tooltip="false"
          :border="true">
        <el-table-column prop="day1" label="时间" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column prop="price1" label="金额" :show-overflow-tooltip="true"></el-table-column>
      </el-table>

    </el-dialog>
  </div>
</template>

<script>
import as from "@/axios/axios";
import axios from "axios";

export default {
  name: "Deposit",
  created() {
    this.getDeposit()
  },
  data(){
    return{
      DepositData:[],
      storePage:{total:1,pages:1,size:1000},
      xq:false,
      xqData:[],
    }
  },
  methods:{
    getDeposit(){
      as.post("/store/communityGetName",{
        current:this.storePage.pages,
        size:this.storePage.size,}).
      then((res)=>{
        console.log("$",res)
        this.DepositData = res.data.data.records
      })
    },
    particulars(row){
      axios.post("http://live.hefeiboge.cn/api/shop.Store/historyProfit",{user_id:row.uid})
          .then((res)=>{
            console.log(res)
            this.xqData = res.data.data
          })
      this.xq = true
    }
  }
}
</script>

<style scoped>

</style>